Skip to content

fix: read skill files as UTF-8 - #26

Merged
steipete merged 3 commits into
steipete:mainfrom
chaochaoweb3:codex/validate-skills-utf8
Jul 2, 2026
Merged

fix: read skill files as UTF-8#26
steipete merged 3 commits into
steipete:mainfrom
chaochaoweb3:codex/validate-skills-utf8

Conversation

@chaochaoweb3

@chaochaoweb3 chaochaoweb3 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read SKILL.md files with explicit UTF-8 encoding in scripts/validate-skills
  • prevents Ruby from falling back to US-ASCII under C/invalid locale settings and rejecting non-ASCII skill front matter

Validation

  • scripts/validate-skills
  • env LC_ALL=C LANG=C scripts/validate-skills
  • git diff --check

Proof for the C-locale path after this patch:

$ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin env LC_ALL=C LANG=C scripts/validate-skills
Validated 49 skill(s).

Note: full CI browser-helper build was not run locally because bun is not installed in this environment.

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 4:51 AM ET / 08:51 UTC.

Summary
The branch changes scripts/validate-skills to read each SKILL.md file with explicit UTF-8 encoding instead of Ruby's locale-dependent default.

Reproducibility: yes. for source-level reproduction: current main reads skill files with Ruby's default external encoding, and the PR body shows the C-locale validator path succeeding after the fix. I did not execute the validator because this review is read-only and must not create checkout artifacts.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • [P2] No repair lane is needed because the patch has no actionable correctness finding and is ready for normal maintainer merge review.

Security
Cleared: The diff only changes Ruby file-read encoding in a local validation script and introduces no concrete security or supply-chain concern.

Review details

Best possible solution:

Merge the narrow UTF-8 read fix after ordinary maintainer review, keeping the validator behavior unchanged except for explicit file encoding.

Do we have a high-confidence way to reproduce the issue?

Yes for source-level reproduction: current main reads skill files with Ruby's default external encoding, and the PR body shows the C-locale validator path succeeding after the fix. I did not execute the validator because this review is read-only and must not create checkout artifacts.

Is this the best way to solve the issue?

Yes. Passing encoding: "UTF-8" at the single file-read boundary is the narrowest maintainable fix for UTF-8 SKILL.md parsing under non-UTF-8 locale settings.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning high; reviewed against 2fe30c0dbef7.

Label changes

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk validation-tool robustness fix with a one-line change and limited maintainer urgency.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal output from the C-locale validator command that directly demonstrates the changed behavior; contributors should still redact private details when posting future logs.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal output from the C-locale validator command that directly demonstrates the changed behavior; contributors should still redact private details when posting future logs.
Evidence reviewed

What I checked:

  • AGENTS.md policy check: No target repository AGENTS.md was present in the checked-out repository, so no repository-specific review policy changed the assessment.
  • Current main behavior: Current main still uses File.read(path) in scripts/validate-skills, so Ruby can use the process default external encoding rather than forcing UTF-8 for skill files. (scripts/validate-skills:40, 2fe30c0dbef7)
  • PR diff: The proposed patch changes only the skill-file read call to File.read(path, encoding: "UTF-8"), leaving the validator's parsing and checks unchanged. (scripts/validate-skills:40, e4f62cfcbcfd)
  • Real behavior proof: The PR body includes after-fix terminal output for env LC_ALL=C LANG=C scripts/validate-skills showing Validated 49 skill(s)., which directly exercises the reported C-locale path. (e4f62cfcbcfd)
  • Feature history: The validator was introduced in commit 0b44e2f7ab49aa8420793a403da6792e6927d83e, which added scripts/validate-skills with locale-dependent File.read(path). (scripts/validate-skills:40, 0b44e2f7ab49)
  • Recent maintenance: Commit 2fe30c0 most recently touched this repository area by adding structured PR review guidance to codex.md, while leaving the skill validator behavior unchanged. (codex.md, 2fe30c0dbef7)

Likely related people:

  • steipete: Commit history shows Peter Steinberger introduced scripts/validate-skills and also authored the current main tip touching repository automation guidance. (role: introduced behavior and recent area contributor; confidence: high; commits: 0b44e2f7ab49, 2fe30c0dbef7; files: scripts/validate-skills, codex.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 2, 2026
@steipete
steipete merged commit f099255 into steipete:main Jul 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants